import React from 'react';

import './index.less';

interface Props {
  time: Date;
  text: string;
}

function LineItem(props: Props) {
  const { time, text } = props;
  const date = new Date(time);
  return (
    <div className='line-item'>
      <div className='date'>{date.getMonth() + 1}月{date.getDate()}日</div>
      <div className='text'>{text}</div>
    </div>
  );
};

export default LineItem;
